import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App.jsx';
import './index.css';
import logo from './assets/logo.svg';

// 动态设置 favicon 为 src/assets/logo.svg
const setFavicon = () => {
  const link = document.querySelector('link[rel="icon"]');
  if (link) link.href = logo;
};
setFavicon();

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <BrowserRouter>
      <App />
    </BrowserRouter>
  </React.StrictMode>
);
